# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models


class Migration(SchemaMigration):

    def forwards(self, orm):
        # Deleting model 'Calendar'
        db.delete_table('agenda_calendar')

        # Deleting model 'Event'
        db.delete_table('agenda_event')

        # Adding model 'Calendrier'
        db.create_table('agenda_calendrier', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('nom', self.gf('django.db.models.fields.CharField')(max_length=50)),
            ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50)),
            ('association', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['agenda.Association'])),
        ))
        db.send_create_signal('agenda', ['Calendrier'])

        # Adding model 'Evenement'
        db.create_table('agenda_evenement', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('titre', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('debut', self.gf('django.db.models.fields.DateTimeField')()),
            ('fin', self.gf('django.db.models.fields.DateTimeField')()),
            ('annule', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('calendrier', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['agenda.Calendrier'])),
        ))
        db.send_create_signal('agenda', ['Evenement'])

        # Adding model 'Association'
        db.create_table('agenda_association', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('nom', self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50)),
            ('adresse', self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('cplt_adresse', self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('code_postal', self.gf('django.db.models.fields.CharField')(max_length=5)),
            ('ville', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('telephone', self.gf('django.db.models.fields.CharField')(max_length=50)),
            ('email', self.gf('django.db.models.fields.EmailField')(max_length=254)),
            ('url', self.gf('django.db.models.fields.URLField')(max_length=200)),
        ))
        db.send_create_signal('agenda', ['Association'])


    def backwards(self, orm):
        # Adding model 'Calendar'
        db.create_table('agenda_calendar', (
            ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50, unique=True)),
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=50)),
        ))
        db.send_create_signal('agenda', ['Calendar'])

        # Adding model 'Event'
        db.create_table('agenda_event', (
            ('end', self.gf('django.db.models.fields.DateTimeField')()),
            ('title', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('start', self.gf('django.db.models.fields.DateTimeField')()),
            ('is_cancelled', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('calendar', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['agenda.Calendar'])),
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
        ))
        db.send_create_signal('agenda', ['Event'])

        # Deleting model 'Calendrier'
        db.delete_table('agenda_calendrier')

        # Deleting model 'Evenement'
        db.delete_table('agenda_evenement')

        # Deleting model 'Association'
        db.delete_table('agenda_association')


    models = {
        'agenda.association': {
            'Meta': {'ordering': "['nom']", 'object_name': 'Association'},
            'adresse': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
            'code_postal': ('django.db.models.fields.CharField', [], {'max_length': '5'}),
            'cplt_adresse': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '254'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'nom': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
            'telephone': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
            'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
            'ville': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        },
        'agenda.calendrier': {
            'Meta': {'ordering': "['nom']", 'object_name': 'Calendrier'},
            'association': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['agenda.Association']"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'nom': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'})
        },
        'agenda.evenement': {
            'Meta': {'ordering': "['debut', 'fin']", 'object_name': 'Evenement'},
            'annule': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'calendrier': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['agenda.Calendrier']"}),
            'debut': ('django.db.models.fields.DateTimeField', [], {}),
            'fin': ('django.db.models.fields.DateTimeField', [], {}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'titre': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        }
    }

    complete_apps = ['agenda']